{ "ras", pixbuf_check_sunras, NULL, NULL, NULL, NULL, NULL, NULL },
{ "ico", pixbuf_check_ico, NULL, NULL, NULL, NULL, NULL, NULL },
{ "bmp", pixbuf_check_bmp, NULL, NULL, NULL, NULL, NULL, NULL },
- { "wbmp", pixbuf_check_wbmp, NULL, NULL, NULL, NULL, NULL, NULL }
+ { "wbmp", pixbuf_check_wbmp, NULL, NULL, NULL, NULL, NULL, NULL },
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
};
if (priv->header_buf_offset >= LOADER_HEADER_SIZE)
{
- if (gdk_pixbuf_loader_load_module (loader) == 0)
+ if (gdk_pixbuf_loader_load_module (loader, NULL) == 0)
return 0;
}
/* We have less the 128 bytes in the image. Flush it, and keep going. */
if (priv->image_module == NULL)
- gdk_pixbuf_loader_load_module (loader);
+ gdk_pixbuf_loader_load_module (loader, NULL);
if (priv->image_module && priv->image_module->stop_load)
priv->image_module->stop_load (priv->context);
{
size_t length;
char membuf[4096];
- struct bmp_progressive_state *State;
+ struct wbmp_progressive_state *State;
GdkPixbuf *pb;
pb = State->pixbuf;
- gdk_pixbuf__bmp_image_stop_load(State);
+ gdk_pixbuf__wbmp_image_stop_load(State);
return pb;
}
ModuleAnimationDoneNotifyFunc
anim_done_func, gpointer user_data)
{
- struct bmp_progressive_state *context;
+ struct wbmp_progressive_state *context;
- context = g_new0(struct bmp_progressive_state, 1);
+ context = g_new0(struct wbmp_progressive_state, 1);
context->prepared_func = prepared_func;
context->updated_func = updated_func;
context->user_data = user_data;
*/
void gdk_pixbuf__wbmp_image_stop_load(gpointer data)
{
- struct bmp_progressive_state *context =
- (struct bmp_progressive_state *) data;
+ struct wbmp_progressive_state *context =
+ (struct wbmp_progressive_state *) data;
g_return_if_fail(context != NULL);
if (context->pixbuf)
}
static gboolean
-getin(struct bmp_progressive_state *context, const guchar **buf, guint *buf_size, guchar *ptr, int datum_size)
+getin(struct wbmp_progressive_state *context, guchar **buf, guint *buf_size, guchar *ptr, int datum_size)
{
int last_num, buf_num;
memmove(context->last_buf, context->last_buf+last_num, context->last_len);
*buf_size -= buf_num;
*buf += buf_num;
+
+ return TRUE;
}
static gboolean
-save_rest(struct bmp_progressive_state *context, const guchar *buf, guint buf_size)
+save_rest(struct wbmp_progressive_state *context, const guchar *buf, guint buf_size)
{
if(buf_size > (sizeof(context->last_buf) - context->last_len))
return FALSE;
}
static gboolean
-get_mbi(struct bmp_progressive_state *context, const guchar **buf, guint *buf_size, int *val)
+get_mbi(struct wbmp_progressive_state *context, guchar **buf, guint *buf_size, int *val)
{
guchar intbuf[16];
int i, n;
- guchar last;
gboolean rv;
*val = 0;
gboolean gdk_pixbuf__bmp_image_load_increment(gpointer data, guchar * buf,
guint size)
{
- struct bmp_progressive_state *context =
- (struct bmp_progressive_state *) data;
+ struct wbmp_progressive_state *context =
+ (struct wbmp_progressive_state *) data;
gboolean bv;
do
first_row = context->cury;
for( ; context->cury < context->height; context->cury++, context->curx = 0)
{
- for( ; context->curx < context->width, context->curx += 8)
+ for( ; context->curx < context->width; context->curx += 8)
{
guchar byte;
guchar *ptr;
if (priv->header_buf_offset >= LOADER_HEADER_SIZE)
{
- if (gdk_pixbuf_loader_load_module (loader) == 0)
+ if (gdk_pixbuf_loader_load_module (loader, NULL) == 0)
return 0;
}
/* We have less the 128 bytes in the image. Flush it, and keep going. */
if (priv->image_module == NULL)
- gdk_pixbuf_loader_load_module (loader);
+ gdk_pixbuf_loader_load_module (loader, NULL);
if (priv->image_module && priv->image_module->stop_load)
priv->image_module->stop_load (priv->context);